package com.subang.function.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.subang.function.mapper.SbTeacherMapper;
import com.subang.function.domain.SbTeacher;
import com.subang.function.service.ISbTeacherService;

/**
 * 讲师Service业务层处理
 * 
 * @author subei
 * @date 2025-03-13
 */
@Service
public class SbTeacherServiceImpl implements ISbTeacherService 
{
    @Autowired
    private SbTeacherMapper sbTeacherMapper;

    /**
     * 查询讲师
     * 
     * @param teacherId 讲师主键
     * @return 讲师
     */
    @Override
    public SbTeacher selectSbTeacherByTeacherId(Long teacherId)
    {
        return sbTeacherMapper.selectSbTeacherByTeacherId(teacherId);
    }

    /**
     * 查询讲师列表
     * 
     * @param sbTeacher 讲师
     * @return 讲师
     */
    @Override
    public List<SbTeacher> selectSbTeacherList(SbTeacher sbTeacher)
    {
        return sbTeacherMapper.selectSbTeacherList(sbTeacher);
    }

    /**
     * 新增讲师
     * 
     * @param sbTeacher 讲师
     * @return 结果
     */
    @Override
    public int insertSbTeacher(SbTeacher sbTeacher)
    {
        return sbTeacherMapper.insertSbTeacher(sbTeacher);
    }

    /**
     * 修改讲师
     * 
     * @param sbTeacher 讲师
     * @return 结果
     */
    @Override
    public int updateSbTeacher(SbTeacher sbTeacher)
    {
        return sbTeacherMapper.updateSbTeacher(sbTeacher);
    }

    /**
     * 批量删除讲师
     * 
     * @param teacherIds 需要删除的讲师主键
     * @return 结果
     */
    @Override
    public int deleteSbTeacherByTeacherIds(Long[] teacherIds)
    {
        return sbTeacherMapper.deleteSbTeacherByTeacherIds(teacherIds);
    }

    /**
     * 删除讲师信息
     * 
     * @param teacherId 讲师主键
     * @return 结果
     */
    @Override
    public int deleteSbTeacherByTeacherId(Long teacherId)
    {
        return sbTeacherMapper.deleteSbTeacherByTeacherId(teacherId);
    }
}
